#encoding: utf-8

class Product < ActiveRecord::Base
	belongs_to :activity

	validates :name, presence: {message: "奖品名称为空"}
	validates :amount, presence: {message: "奖品数量为空"}
	validates :amount, numericality: {message: "奖品数量不是数字"}
	validates :probability, presence: {message: "奖品概率为空"}
	validates :probability, numericality: {message: "奖品概率不是数字"}
end
